//
//  TP_OperationTabBarController.swift
//  Easy_Car_Treasure_Swift
//
//  Created by 谭鹏 on 2017/6/5.
//  Copyright © 2017年 谭鹏. All rights reserved.
//

import UIKit

class TP_OperationTabBarController: UITabBarController {
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        let titles = ["首页","监控","查询","我的"];
        let VCs = [TP_HomeViewController(),TP_MonitorViewController(),TP_SearchViewController(),TP_MeViewController()];
        let tabbarImgNames = ["Bar_home","Bar_monitor","Bar_search","Bar_mine"]
        var navs = [UINavigationController]()
        
        for i in 0..<titles.count{
            let vc:UIViewController = VCs[i]
            vc.hidesBottomBarWhenPushed = false;
            self.tabBar.tintColor = TP_Color.white
            vc.tabBarItem.image = UIImage.init(named:tabbarImgNames[i])
            let nav = UINavigationController.init(rootViewController: vc)
            nav.title = titles[i]
            navs.append(nav)
        }
        
        self.viewControllers = navs
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    

}
